package Formularios;

import java.awt.BorderLayout;
import java.awt.Dimension;
import javax.swing.*;
  
public class Progress extends JFrame {
	JProgressBar current;
	JTextArea out;
	JButton find;
	Thread runner;
	private int reg;
		
public Progress(int cant) 	{
	 reg = cant;
	 setTitle("Progreso");
	 setBounds(450, 200, 0, 0);	 
	 setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
	 JPanel pane = new JPanel();	
	 pane.setLayout(new BorderLayout());
	 pane.setPreferredSize(new Dimension(250, 25));
	 pane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
	 current = new JProgressBar(0, reg);
	 current.setValue(0);
	 current.setStringPainted(true);
	 pane.add(current);
	 setContentPane(pane);
	 
	
	}
	public void actualizar(int valor){
		current.setValue(valor);	
		if(reg == valor) setVisible(false);		
	}	 
}
